#ifndef CHINESEENGLISHMAPPING_H
#define CHINESEENGLISHMAPPING_H

#include <QString>
#include <QMap>
#include <QVariant>

#define COMMONS ChineseEnglishMapping::getSingleon()
class ChineseEnglishMapping
{
public:
    ChineseEnglishMapping();

    //获取类的指针
    static ChineseEnglishMapping* getSingleon();

    //获取表头
    QStringList getTableWidgetHeadLabels(const QString& fileName, const QStringList& list);

    // 获取机型名到标题的函数
    QVariant getModelNameToTitle(const QVariant &key) const;

    // 获取listWidget标题的函数
    QVariant getListWidgetToTitle(const QString &dirname, const QVariant &key) const;

    // 获取GroupBox的标题
    QVariant getGroupBoxTitle(const QVariant &key) const;

    // 获取表头的函数
    QVariant getTableWidgetHead(const QString &dirname, const QString &fileName, const QVariant &key) const;
public:
    QString MachType{""};
    QString XmlPath{"D:"};
private:
    QMap<QVariant, QVariant> ModelNameToTitleMap{}; // 机型名到标题的映射

    //listWidget映射
    QMap<QVariant, QVariant> ListWidgetTitle350Map{};//350 listWidget映射
    QMap<QVariant, QVariant> ListWidgetTitle1021Map{};//1021 listWidget映射
    QMap<QVariant, QVariant> ListWidgetTitle1028Map{};//1028 listWidget映射

    QMap<QVariant, QVariant> GroupBoxTitleMap{}; // GroupBox标题的映射
    //表头
    QMap<QVariant, QVariant> Alarm350tableHeadMap{};            //350 Alarm
    QMap<QVariant, QVariant> AutoControl350tableHeadMap{};      //350 AutoControl
    QMap<QVariant, QVariant> CustomMoto350tableHeadMap{};       //350 CustomMoto
    QMap<QVariant, QVariant> CustomTempDiff350tableHeadMap{};   //350 CustomTempDiff
    QMap<QVariant, QVariant> Fan350tableHeadMap{};              //350 Fan
    QMap<QVariant, QVariant> GlobalParam350tableHeadMap{};      //350 GlobalParam
    QMap<QVariant, QVariant> IO350tableHeadMap{};               //350 IO
    QMap<QVariant, QVariant> MainPower350tableHeadMap{};        //350 MainPower
    QMap<QVariant, QVariant> Monitor350tableHeadMap{};          //350 Monitor
    QMap<QVariant, QVariant> Moto350tableHeadMap{};             //350 Moto
    QMap<QVariant, QVariant> SmokeSensor350tableHeadMap{};      //350 SmokeSensor
    QMap<QVariant, QVariant> TempSensor350tableHeadMap{};       //350 TempSensor
    QMap<QVariant, QVariant> user350tableHeadMap{};             //350 user
    QMap<QVariant, QVariant> TempSensor1021tableHeadMap{};      //1021 TempSensor
    QMap<QVariant, QVariant> AutoControl1028tableHeadMap{};     //1028 AutoControl
    QMap<QVariant, QVariant> TempSensor1028tableHeadMap{};      //1028 TempSensor
    QMap<QVariant, QVariant> AtDevice1028tableHeadMap{};        //1028 AtDevice
};

#endif // CHINESEENGLISHMAPPING_H
